<%@ page language="java" import="java.util.*,com.beans.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<title>邮寄信息</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/basestyle.css" ></link>

<script type="text/javascript">
	function validateAndSubmit(){
		var result=true;
		document.getElementById("trueName_msg").innerHTML="";
		document.getElementById("phone_msg").innerHTML="";
		document.getElementById("zipCode_msg").innerHTML="";
		document.getElementById("address_msg").innerHTML="";
		
		if(f1.trueName.value==""){
			result=false;
			document.getElementById("trueName_msg").innerHTML="姓名不能为空!";
		}
		
		if(f1.phone.value==""){
			result=false;
			document.getElementById("phone_msg").innerHTML="电话不能为空!";
		}
		
		if(f1.zipCode.value==""){
			result=false;
			document.getElementById("zipCode_msg").innerHTML="邮编不能为空!";
		}
		
		if(f1.address.value==""){
			result=false;
			document.getElementById("address_msg").innerHTML="地址不能为空!";
		}
		
		if(result==true){
			document.f1.submit();
		}	
	}
</script>
</head>
<body>
	<%
		MemberInfo user=(MemberInfo)session.getAttribute("user");
	%>
<div id="div_content">
<jsp:include page='<%= user==null?"../top.jsp":"../top_login.jsp" %>'></jsp:include>
<table id="maintable"  >
  <tr>
    <td></td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="60"><img src="${pageContext.request.contextPath }/images/zhifuguanli.gif" /></td>
      </tr>
      <tr>
        <td><table cellspacing="0" cellpadding="0" border="0" align="center">
           <tr valign="middle">
              <td><img hspace="5" src="${pageContext.request.contextPath }/images/Car_07.gif" /></td>
              <td class="carbg_default">查看购物车物品</td>
              <td><img height="39" src="${pageContext.request.contextPath }/images/Car_15.gif" width="1" /></td>
              <td align="center"><img hspace="5" src="${pageContext.request.contextPath }/images/Car_09.gif" /></td>
			  <td class="carbg_current">填写用户邮递地址</td>
              <td><img height="39" src="../images/Car_15.gif" width="1" /></td>
			  <td align="center"><img hspace="5" src="${pageContext.request.contextPath }/images/Car_09.gif" /></td>
              <td class="carbg_default">选择付款方式</td>
              <td><img height="39" src="../images/Car_15.gif" width="1" /></td>
              <td align="center"><img hspace="5" src="${pageContext.request.contextPath }/images/Car_11.gif" /></td>
              <td class="carbg_default">订单提交成功</td>
              <td><img height="39" src="${pageContext.request.contextPath }/images/Car_15.gif" width="1" /></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td align="center">
          
       <form action="${pageContext.request.contextPath }/shopping/paymentType.jsp" method="post" name="f1">

			<table cellspacing="1" cellpadding="0" width="82%" border="0" bgcolor="#F7F3F7">
			  <tr height="26" bgcolor="white">
                <td width="46%" style="padding-left: 210px" class="text" >收货人姓名:</td>
                <td width="54%" style="padding-left: 30px"  class="text"><input name="trueName" type="text" value="${user.memberName}" size="30"   />
                <label id="trueName_msg" class="msg"></label>
                </td>
              </tr>
			  <tr height="26" bgcolor="white">
                <td width="46%" style="padding-left: 210px" class="text">收货人电话:</td>
                <td width="54%" style="padding-left: 30px"  class="text"><input name="phone" type="text" value="${user.phone}" size="30"  />
              	  <label id="phone_msg" class="msg"></label>
                </td>
              </tr>
			   
			  <tr height="26" bgcolor="white">
                <td width="46%" style="padding-left: 210px" class="text">收货人邮编:</td>
                <td width="54%" style="padding-left: 30px"  class="text"><input name="zipCode" type="text" value="${user.zipCode}" size="30"  />
                <label id="zipCode_msg" class="msg"></label>
                </td>
              </tr>
			  <tr height="26" bgcolor="white">
                <td width="46%" style="padding-left: 210px" class="text">收货人地址:</td>
                <td width="54%" style="padding-left: 30px"  class="text"><input name="address" type="text" value="${user.address}" size="30"   />
                  <label id="address_msg" class="msg"></label>
                </td>
              </tr>
			  <tr height="26" bgcolor="white">
                <td width="48%" style="padding-left: 210px"  class="text">邮寄的方式:</td>
                <td width="52%" style="padding-left: 30px"  class="text">
                  <input type="radio" name="postMethod" value="平邮" checked="checked"/>平邮&nbsp;10元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="radio" name="postMethod" value="快递"/>快递&nbsp;15元
                </td>
              </tr>
        </table>
          </form>
        </td>
      </tr>
	  <tr height="20"><td colspan="5">.</td></tr>	  
      <tr align="right">
        <td align="center">
           <a href="${pageContext.request.contextPath }/shopping/shopCartList.jsp">
            <img border="0"  onclick="continueBuy()" src="${pageContext.request.contextPath }/images/Car_icon_back.gif" />
           </a>	
             <a onclick="validateAndSubmit();">
			<img src="${pageContext.request.contextPath }/images/Car_icon_03.gif"  >
			 </a>
		</td>
      </tr>
      <tr align="right">
        <td height="20">&nbsp;</td>
      </tr>
    </table></td>
      
  </tr>
</table>
<%@ include file="../bottom.jsp" %>
</div>
</body>
</html>
